Skip to content

8384088: osThread _thread_id should be an int on all BSD's#31070

Closed
snake66 wants to merge 3 commits into
openjdk:masterfrom
snake66:upstream-master--osthread-cleanup
Closed

8384088: osThread _thread_id should be an int on all BSD's#31070
snake66 wants to merge 3 commits into
openjdk:masterfrom
snake66:upstream-master--osthread-cleanup

Conversation

@snake66
Copy link
Copy Markdown
Contributor

@snake66 snake66 commented May 7, 2026

The initializer for the _thread_id member in hotspot/os/bsd/osThread_bsd.cpp is incorrect for BSD's other than macOS. It should be an integer on all BSD's.

This work is sponsored by The FreeBSD Foundation



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8384088: osThread _thread_id should be an int on all BSD's (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31070/head:pull/31070
$ git checkout pull/31070

Update a local copy of the PR:
$ git checkout pull/31070
$ git pull https://git.openjdk.org/jdk.git pull/31070/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31070

View PR using the GUI difftool:
$ git pr show -t 31070

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31070.diff

Using Webrev

Link to Webrev Comment

The initializer for the _thread_id member in
hotspot/os/bsd/osThread_bsd.cpp is incorrect for BSD's other than macOS.
It should be an integer on all BSD's.

This work is sponsored by The FreeBSD Foundation
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 7, 2026

👋 Welcome back haraldei! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

@snake66 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8384088: osThread _thread_id should be an int on all BSD's

Reviewed-by: phubner, dholmes

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 98 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@Arraying, @dholmes-ora) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk Bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label May 7, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

@snake66 The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-runtime. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 7, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 7, 2026

Webrevs

Copy link
Copy Markdown
Member

@Arraying Arraying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, pid_t is actually __pid_t which is an __int32_t on FreeBSD. I checked OpenBSD and NetBSD as well (these are the ones we have macros for) and it's the same there. Seems like a reasonable change to me, thank you!

Comment thread src/hotspot/os/bsd/osThread_bsd.cpp Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump.

This work is sponsored by The FreeBSD Foundation
#include "runtime/mutex.hpp"
#include "runtime/osThread.hpp"

#include <signal.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see it being used by the code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 40: sigemptyset(&_caller_sigmask);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man! How could I miss that!
I'll put it back in :)

This work is sponsored by The FreeBSD Foundation
Copy link
Copy Markdown
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@snake66 snake66 requested a review from Arraying May 14, 2026 07:19
Copy link
Copy Markdown
Member

@Arraying Arraying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, was on vacation. LGTM.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 18, 2026
@snake66
Copy link
Copy Markdown
Contributor Author

snake66 commented May 18, 2026

Sorry, was on vacation. LGTM.

No worries, vacation is important! :) Thanks for the reviews @Arraying and @dholmes-ora!

@snake66
Copy link
Copy Markdown
Contributor Author

snake66 commented May 18, 2026

/integrate

@openjdk openjdk Bot added the sponsor Pull request is ready to be sponsored label May 18, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 18, 2026

@snake66
Your change (at version d0d84a3) is now ready to be sponsored by a Committer.

@Arraying
Copy link
Copy Markdown
Member

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 18, 2026

Going to push as commit e9bc05c.
Since your change was applied there have been 99 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label May 18, 2026
@openjdk openjdk Bot closed this May 18, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels May 18, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 18, 2026

@Arraying @snake66 Pushed as commit e9bc05c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants